
/// <BaseRespR<T> 返回 status code msg data Response.
class WebsiteInfoResult {
  bool flag = true;
  int code = 20000;
  String message = '';
  late WebsiteInfo data;

  WebsiteInfoResult(this.flag, this.code, this.message,this.data);

  WebsiteInfoResult.fromJson(Map<String, dynamic> json){
    flag = json['flag'];
    code = json['code'];
    message = json['message'];
    data = (json['data'] != null ? new WebsiteInfo.fromJson(json['data']) : null)!;
  }

  @override
  String toString() {
    StringBuffer sb = StringBuffer('{');
    sb.write(",\"flag\":$flag");
    sb.write(",\"code\":\"$code\"");
    sb.write(",\"message\":\"$message\"");
    sb.write(",\"data\":\"$data\"");
    sb.write('}');
    return sb.toString();
  }
}

class WebsiteInfo {
  int articleCount = 0;
  int categoryCount = 0;
  int tagCount = 0;
  String viewsCount = '';
  late WebsiteConfig websiteConfig;
  List<PageList> pageList = [];

  WebsiteInfo(
      {required this.articleCount,
        required this.categoryCount,
        required this.tagCount,
        required this.viewsCount,
        required this.websiteConfig,
        required this.pageList});

  WebsiteInfo.fromJson(Map<String, dynamic> json) {
    articleCount = json['articleCount'];
    categoryCount = json['categoryCount'];
    tagCount = json['tagCount'];
    viewsCount = json['viewsCount'];
    websiteConfig = (json['websiteConfig'] != null
        ? new WebsiteConfig.fromJson(json['websiteConfig'])
        : null)!;
    if (json['pageList'] != null) {
      pageList = <PageList>[];
      json['pageList'].forEach((v) {
        pageList.add(new PageList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['articleCount'] = this.articleCount;
    data['categoryCount'] = this.categoryCount;
    data['tagCount'] = this.tagCount;
    data['viewsCount'] = this.viewsCount;
    if (this.websiteConfig != null) {
      data['websiteConfig'] = this.websiteConfig.toJson();
    }
    if (this.pageList != null) {
      data['pageList'] = this.pageList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class WebsiteConfig {
  String websiteAvatar = '';
  String websiteName = '';
  String websiteAuthor = '';
  String websiteIntro = '';
  String websiteNotice = '';
  String websiteCreateTime = '';
  String websiteRecordNo = '';
  List<String> socialLoginList = [];
  List<String> socialUrlList = [];
  String qq = '';
  String github = '';
  String gitee = '';
  String version = '';
  String downloadUrl = '';
  String versionDesc = '';
  String touristAvatar= '';
  String userAvatar= '';
  int isCommentReview = 0;
  int isMessageReview = 0;
  int isEmailNotice = 0;
  int isReward = 0;
  String weiXinQRCode= '';
  String alipayQRCode= '';
  int isChatRoom = 0;
  String websocketUrl= '';
  int isMusicPlayer = 0;

  WebsiteConfig(
      {required this.websiteAvatar,
        required this.websiteName,
        required this.websiteAuthor,
        required this.websiteIntro,
        required this.websiteNotice,
        required this.websiteCreateTime,
        required this.websiteRecordNo,
        required this.socialLoginList,
        required this.socialUrlList,
        required this.qq,
        required this.github,
        required this.gitee,
        required this.version,
        required this.downloadUrl,
        required this.versionDesc,
        required this.touristAvatar,
        required this.userAvatar,
        required this.isCommentReview,
        required this.isMessageReview,
        required this.isEmailNotice,
        required this.isReward,
        required this.weiXinQRCode,
        required this.alipayQRCode,
        required this.isChatRoom,
        required this.websocketUrl,
        required this.isMusicPlayer});

  WebsiteConfig.fromJson(Map<String, dynamic> json) {
    websiteAvatar = json['websiteAvatar'];
    websiteName = json['websiteName'];
    websiteAuthor = json['websiteAuthor'];
    websiteIntro = json['websiteIntro'];
    websiteNotice = json['websiteNotice'];
    websiteCreateTime = json['websiteCreateTime'];
    websiteRecordNo = json['websiteRecordNo'];
    socialLoginList = json['socialLoginList'].cast<String>();
    socialUrlList = json['socialUrlList'].cast<String>();
    qq = json['qq'];
    github = json['github'];
    gitee = json['gitee'];
    version = json['version'];
    downloadUrl = json['downloadUrl'];
    versionDesc = json['versionDesc'];
    touristAvatar = json['touristAvatar'];
    userAvatar = json['userAvatar'];
    isCommentReview = json['isCommentReview'];
    isMessageReview = json['isMessageReview'];
    isEmailNotice = json['isEmailNotice'];
    isReward = json['isReward'];
    weiXinQRCode = json['weiXinQRCode'];
    alipayQRCode = json['alipayQRCode'];
    isChatRoom = json['isChatRoom'];
    websocketUrl = json['websocketUrl'];
    isMusicPlayer = json['isMusicPlayer'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['websiteAvatar'] = this.websiteAvatar;
    data['websiteName'] = this.websiteName;
    data['websiteAuthor'] = this.websiteAuthor;
    data['websiteIntro'] = this.websiteIntro;
    data['websiteNotice'] = this.websiteNotice;
    data['websiteCreateTime'] = this.websiteCreateTime;
    data['websiteRecordNo'] = this.websiteRecordNo;
    data['socialLoginList'] = this.socialLoginList;
    data['socialUrlList'] = this.socialUrlList;
    data['qq'] = this.qq;
    data['github'] = this.github;
    data['gitee'] = this.gitee;
    data['version'] = this.version;
    data['downloadUrl'] = this.downloadUrl;
    data['versionDesc'] = this.versionDesc;
    data['touristAvatar'] = this.touristAvatar;
    data['userAvatar'] = this.userAvatar;
    data['isCommentReview'] = this.isCommentReview;
    data['isMessageReview'] = this.isMessageReview;
    data['isEmailNotice'] = this.isEmailNotice;
    data['isReward'] = this.isReward;
    data['weiXinQRCode'] = this.weiXinQRCode;
    data['alipayQRCode'] = this.alipayQRCode;
    data['isChatRoom'] = this.isChatRoom;
    data['websocketUrl'] = this.websocketUrl;
    data['isMusicPlayer'] = this.isMusicPlayer;
    return data;
  }
}

class PageList {
  String pageCover = '';
  int id = 0;
  String pageName = '';
  String pageLabel = '';

  PageList({required this.pageCover,required this.id,required this.pageName, required this.pageLabel});

  PageList.fromJson(Map<String, dynamic> json) {
    pageCover = json['pageCover'];
    id = json['id'];
    pageName = json['pageName'];
    pageLabel = json['pageLabel'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['pageCover'] = this.pageCover;
    data['id'] = this.id;
    data['pageName'] = this.pageName;
    data['pageLabel'] = this.pageLabel;
    return data;
  }
}